﻿@{
    Layout = null;

    Check.User(Can.UploadMedia);
    
    if (IsPost) {
        var file = Request.Files[0];
        if (file != null) {
            var filename = file.FileName;
            var location = Server.MapPath("~/Media/" + UrlData[0]);
            file.SaveAs(Path.Combine(location, filename));

        }
    }
}
